package xyz.syyrjx.blog.util;

import java.util.Random;

/**
 * @author 大地崩坏苍蝇兽
 * @date 2024/3/10 20:14
 * @description ...
 * @since v0.0.1
 */
public class RandomUtil {
    private static Random random = new Random();

    public static long randomLong(long limit){
        return random.nextLong() % limit;
    }
    public static long randomLong(){
        return random.nextLong();
    }

    public static int randomInt(int limit){
        return random.nextInt(limit);
    }
    public static int randomInt(){
        return random.nextInt();
    }

    public static int randomPositiveInteger(){
        int temp = random.nextInt();
        if (temp < 0) {
            temp = -temp;
        }
        return temp;
    }


}
